package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.EmpAttendanceExample.E_COMPANY_ID;
import static org.jsola.hr.example.EmpAttendanceExample.E_DAILY;
import static org.jsola.hr.example.EmpAttendanceExample.E_DAY_WORK_TIME;
import static org.jsola.hr.example.EmpAttendanceExample.E_EDIT_BY;
import static org.jsola.hr.example.EmpAttendanceExample.E_EMP_ID;
import static org.jsola.hr.example.EmpAttendanceExample.E_IS_WORK;
import static org.jsola.hr.example.EmpAttendanceExample.E_MONTHLY;
import static org.jsola.hr.example.EmpAttendanceExample.E_WORK_DAY;
import static org.jsola.hr.example.EmpAttendanceExample.E_YEARLY;
import static org.jsola.hr.example.EmpAttendanceExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.EmpAttendanceExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.EmpAttendanceExample.M_DAILY_NOT_NULL;
import static org.jsola.hr.example.EmpAttendanceExample.M_DAY_WORK_TIME_NOT_NULL;
import static org.jsola.hr.example.EmpAttendanceExample.M_EDIT_BY_MAX;
import static org.jsola.hr.example.EmpAttendanceExample.M_EMP_ID_MAX;
import static org.jsola.hr.example.EmpAttendanceExample.M_EMP_ID_NOT_NULL;
import static org.jsola.hr.example.EmpAttendanceExample.M_IS_WORK_NOT_NULL;
import static org.jsola.hr.example.EmpAttendanceExample.M_MONTHLY_NOT_NULL;
import static org.jsola.hr.example.EmpAttendanceExample.M_WORK_DAY_NOT_NULL;
import static org.jsola.hr.example.EmpAttendanceExample.M_YEARLY_NOT_NULL;
import static org.jsola.hr.example.EmpAttendanceExample.N_COMPANY_ID;
import static org.jsola.hr.example.EmpAttendanceExample.N_DAILY;
import static org.jsola.hr.example.EmpAttendanceExample.N_DAY_WORK_TIME;
import static org.jsola.hr.example.EmpAttendanceExample.N_EDIT_BY;
import static org.jsola.hr.example.EmpAttendanceExample.N_EMP_ID;
import static org.jsola.hr.example.EmpAttendanceExample.N_IS_WORK;
import static org.jsola.hr.example.EmpAttendanceExample.N_MONTHLY;
import static org.jsola.hr.example.EmpAttendanceExample.N_WORK_DAY;
import static org.jsola.hr.example.EmpAttendanceExample.N_YEARLY;

/**
 * 员工考勤表
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【员工考勤表】的参数")
@Data
public class EmpAttendanceAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_EMP_ID, example = E_EMP_ID, required = true)
    @NotNull(message = M_EMP_ID_NOT_NULL)
    @Length(max = 32, message = M_EMP_ID_MAX)
    private String empId;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_DAY_WORK_TIME, example = E_DAY_WORK_TIME, required = true)
    @NotNull(message = M_DAY_WORK_TIME_NOT_NULL)
    private Float dayWorkTime;

    @ApiModelProperty(notes = N_IS_WORK, example = E_IS_WORK, required = true)
    @NotNull(message = M_IS_WORK_NOT_NULL)
    private Boolean isWork;

    @ApiModelProperty(notes = N_WORK_DAY, example = E_WORK_DAY, required = true)
    @NotNull(message = M_WORK_DAY_NOT_NULL)
    private Float workDay;

    @ApiModelProperty(notes = N_YEARLY, example = E_YEARLY, required = true)
    @NotNull(message = M_YEARLY_NOT_NULL)
    private Integer yearly;

    @ApiModelProperty(notes = N_MONTHLY, example = E_MONTHLY, required = true)
    @NotNull(message = M_MONTHLY_NOT_NULL)
    private Integer monthly;

    @ApiModelProperty(notes = N_DAILY, example = E_DAILY, required = true)
    @NotNull(message = M_DAILY_NOT_NULL)
    private Integer daily;

    @ApiModelProperty(notes = N_EDIT_BY, example = E_EDIT_BY)
    @Length(max = 50, message = M_EDIT_BY_MAX)
    private String editBy;


}

